﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nwrole.lib {

    public delegate void NwroleSettingsChangedHandler(object sender, EventArgs e);
    public class NwroleSettingsChangedEventArgs : EventArgs
    {
        public string Name;
    }

    public interface IServiceProvider {
        
        event NwroleSettingsChangedHandler SupervisorSettingsChangedEvent;
        event NwroleSettingsChangedHandler ServiceSettingsChangedEvent;

        void Start();
        string[] GetServiceNames();

        PropertyList LoadSupervisorSettings();
        void SaveSupervisorSettings(PropertyList plist);

        PropertyList LoadServiceSettings(string serviceName);
        void SaveServiceSettings(PropertyList plist, string serviceName);

        Dictionary<string, object> GetPluginProviderSettings();

        void PulseService(Guid id, string serviceName, string message);
        void PulsePlugin(Guid id, string pluginName, string message);

        ServicePulse GetServicePulse(Guid serviceId);
        PluginPulse GetPluginPulse(Guid pluginId);
    }
}
